package vn.edu.hcmut.cse.ai.search.problems.waterjug;

import vn.edu.hcmut.cse.ai.infrastructure.GoalTest;

public class WaterGoalTest implements GoalTest {

    private final WaterState goalState;

    public WaterGoalTest(WaterState goalState) {
        this.goalState = goalState;
    }

    @Override
    public boolean isGoalState(Object state) {
        WaterState waterState = (WaterState) state;
        return waterState.equals(goalState);
    }

    @Override
    public Object getGoalState() {
        return this.goalState;
    }

}
